/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx.manager;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * <p>Project: jse2204 - StudentManager
 * <p>Powered by webrx On 2022-10-08 10:03:39
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class StudentManager {
    static{
        Util.load();
    }
    public static void main(String[] args) {
        //2.循环语句
        menu:
        while (true) {
            //3.建立键盘输入对象
            Scanner sc = new Scanner(System.in);
            System.out.println(Util.center(" 学生管理系统Ver1.0 ",50,"*"));
            System.out.println(Util.center(" 1. 添加学生    ",50," "));
            System.out.println(Util.center(" 2. 删除学生    ",50," "));
            System.out.println(Util.center(" 3. 修改学生    ",50," "));
            System.out.println(Util.center(" 4. 查看所有学生 ",50," "));
            System.out.println(Util.center(" 5. 退出      ",50," "));
            System.out.print("请输入[1-5]：");
            int index = sc.nextInt();
            switch (index) {
                case 1:
                    Util.add();
                    break;
                case 2:
                    Util.delete();
                    break;
                case 3:
                    System.out.println("修改");
                    break;
                case 4:
                    Util.printAll(); //查看所有学生信息
                    break;
                default:
                    System.out.println("系统退出");
                    break menu;
            }
        }
    }
}
